import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    component: () => import('@/layout'),
    redirect: '/home',
    children: [
      {
        path: 'home',
        name: 'home',
        component: () => import('@/views/home')
      },
      {
        path: 'categories',
        name: 'categories',
        component: () => import('@/views/equipment/categories')
      },
      {
        path: 'condition',
        name: 'condition',
        component: () => import('@/views/equipment/condition')
      },
      {
        path: 'dztj',
        name: 'dztj',
        component: () => import('@/views/dztj/index')
      },
      {
        path: 'manage',
        name: 'manage',
        component: () => import('@/views/equipment/manage')
      },
      {
        path: 'task',
        name: 'task',
        component: () => import('@/views/task')
      }
    ]
  },

  { path: '/login', component: () => import('@/views/login') },
  {
    path: '/404',
    component: () => import('@/views/404'),
    hidden: true
  }
]

const router = new VueRouter({
  routes
})

export default router
